package principle.Builder.improve;

/**
 * @author malguy-wang sir
 * @create ---
 */
//指定制作流程，返回产品
public class houseDirect {
    private HouseBuilder houseBuilder;
    //两种方法传入抽象建造类
    public houseDirect(HouseBuilder houseBuilder){
        this.houseBuilder = houseBuilder;
    }
    public void setHouseBuilder(HouseBuilder houseBuilder) {
        this.houseBuilder = houseBuilder;
    }
    //建造流程处理交给指导者
    public House constructHouse(){
        houseBuilder.buildBasic();
        houseBuilder.buildWalls();
        houseBuilder.roofed();
        return houseBuilder.getHOUSE();
    }
}
